package test.study.nosql.json;

import lombok.Data;

import java.io.Serializable;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.IntStream;

@Data
public class GrantedAuthority implements Serializable {

    private String authority;

    public static List<GrantedAuthority> authList(int size) {
        return IntStream.range(0, size).mapToObj(e -> {
            GrantedAuthority G = new GrantedAuthority();
            G.setAuthority("权限 " + (e + 1));
            return G;
        }).collect(Collectors.toList());
    }
}
